import { AudioClip } from "cc";
import { tgxAudioMgr } from "../../core_tgx/tgx";
import { ModuleDef } from "../../scripts/ModuleDef";

export class AudioPlayer {

    public static playOneShot(sound: AudioClip | string, volume: number = 1.0) {
        tgxAudioMgr.inst.playOneShot(sound, volume, ModuleDef.BILLIARDS);
    }

    public static play(sound: AudioClip | string, volume: number = 1.0) {
        tgxAudioMgr.inst.play(sound, volume, ModuleDef.BILLIARDS);
    }

    public static stop() {
        tgxAudioMgr.inst.stop();
    }

    public static pause() {
        tgxAudioMgr.inst.pause();
    }
}